<template>
    <div>
        <div class="loader-wrap" v-if="showLoad"></div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            showLoad:true,
        }
    },
    created(){
        this.getWechatOpendId();
    },
    methods:{
        getWechatOpendId(){
            var URL = 'http://' + window.location.host + '/redirect.html';
            var params = {
                url: URL
            };
            this.Ajax.post("getIndexou", params).then(function(resp){
                if (resp.IsSuccess) {
                    window.location.href = resp.ErrorMessage;
                } else {
                    alert('服务器连接失败！');
                    window.event.returnValue = false;
                }
            });
        },
    }
}
</script>                     